#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

double Power(double base, int exponent) {
    // write code here
    double i = 1;
    if (exponent > 0)
    {
        for (; exponent > 0; exponent--)
        {
            i *= base;
        }
    }
    else if (exponent < 0)
    {
        for (; exponent < 0; exponent++)
        {
            i *= base;
        }
        i = 1 / i;
    }
    else
        return 1;
    return i;
}